package com.edu.userscenter.common;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.edu.userscenter.util.ConstatFinalUtil;

/**
 * 所有测试类的父类
 * 
 * @author Administrator
 *
 */
public class BaseTest
{
	protected ApplicationContext ac ;
	@Before
	public void init()
	{
		/**
		 * 配置文件
		 */
		ac = new ClassPathXmlApplicationContext("classpath:spring/applicationContext_*.xml");
		ConstatFinalUtil.logger.info("--init--ac:{}",ac);
	}
	@Test
	public void test()
	{
		ConstatFinalUtil.logger.info("--test--");
	}
	@After
	public void close()
	{
		ClassPathXmlApplicationContext cpxac = (ClassPathXmlApplicationContext) this.ac;
		cpxac.close();
		ConstatFinalUtil.logger.info("--close--");
	}
}
